﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Test
{
    class TestInheritance
    {

        public static void Test()
        {
            Child c = new Child();
            Child c1 = new Child("dddddd");
        }
    }

    public abstract class Parent
    {
        public abstract String Name
        {
            get;
        }

        public Parent()
        {
            Console.WriteLine(Name);
        }
    }

    public class Child : Parent
    {
        private string name;

        public override string Name
        {
            get { return name; }
        }

        public Child()
        {
        }

        public Child(String name)
        {
            this.name = name;
        }
    }
}
